import React, { Component } from 'react';
import {Progress,Button} from 'iftide';
import {View} from 'react-native'

export default class Basic4 extends Component{
    constructor(props) {
        super(props);
        this.state = {
            percent: 50,
            isShow:false
        }
    }

    onClick(){
        this.setState({
            isShow:true
        })
    }

    onClose=()=>{
        this.setState({
            isShow:!this.state.isShow
        })
    }

    render() {
        return (
            <View style={{marginTop:30}}>
                <Button title={'模态框圆形进度条'} onPress={() => this.onClick()}/>
                <Progress
                    type={'circle'}
                    isShow={this.state.isShow}
                    radius={52}
                    percent={this.state.percent}
                    strokeWidth={7}
                    bgcolor={'green'}
                    isModal={true}
                    modalTitle={'标题'}
                    onClose={()=>{this.onClose()}}
                />
            </View>
        );
    }
}